<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
       xmlns:p="http://primefaces.prime.com.tr/ui">

   <ui:composition template="/template/DefaultTemplate.xhtml">

        <ui:define name="content">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>    
            <h:form>
            <p:panel toggleable="true" id="customerView" header="Sales Lead Details">
            
                <h:panelGrid columns="2">
                    <h:outputText value="ID: "/>
                    <h:outputText value="#{salesLeadEntityController.selected.id}" title="#{bundle.ViewSalesLeadEntityTitle_id}"/>
                    
                    <h:outputText value="Title: "/>
                    <h:outputText value="#{salesLeadEntityController.selected.title}" title="#{bundle.ViewSalesLeadEntityTitle_title}"/>
                    
                     <h:outputText value="User Name: "/>
                    <h:outputText value="#{salesLeadEntityController.selected.name}" title="#{bundle.ViewSalesLeadEntityTitle_name}"/>
                    
                     <h:outputText value="First Name: "/>
                    <h:outputText value="#{salesLeadEntityController.selected.firstName}" title="#{bundle.ViewSalesLeadEntityTitle_firstName}"/>
                    
                    <h:outputText value="Last Name: "/>
                    <h:outputText value="#{salesLeadEntityController.selected.lastName}" title="#{bundle.ViewSalesLeadEntityTitle_lastName}"/>
                   
                    <h:outputText value="Company Name: "/>
                    <h:outputText value="#{salesLeadEntityController.selected.companyName}" title="#{bundle.ViewSalesLeadEntityTitle_companyName}"/>
                    
                    <h:outputText value="Job Title: "/>
                    <h:outputText value="#{salesLeadEntityController.selected.jobTitle}" title="#{bundle.ViewSalesLeadEntityTitle_jobTitle}"/>
                   
                    <h:outputText value="Date Created: "/>
                    <h:outputText value="#{salesLeadEntityController.selected.createdAt}" title="#{bundle.ViewSalesLeadEntityTitle_createdAt}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:outputText>
                    
                    <h:outputText value="Created By: "/>
                    <h:outputText value="#{salesLeadEntityController.selected.createdBy}" title="#{bundle.ViewSalesLeadEntityTitle_createdBy}"/>
                    
                    <h:outputText value="Last Modified Date: "/>
                    <h:outputText value="#{salesLeadEntityController.selected.lastModifiedAt}" title="#{bundle.ViewSalesLeadEntityTitle_lastModifiedAt}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:outputText>
                   
                    <h:outputText value="Last Modified By: "/>
                    <h:outputText value="#{salesLeadEntityController.selected.lastModifiedBy.firstName}" title="#{bundle.ViewSalesLeadEntityTitle_lastModifiedBy}"/>
               
                    
                    <h:outputText value="Customer Type: "/>
                    <h:outputText value="#{salesLeadEntityController.selected.customerType}" title="#{bundle.ViewSalesLeadEntityTitle_title}"/>
                      </h:panelGrid>    
                </p:panel>
                <br/>
                <p:panel toggleable="true" id="salesLeadContact" header="Contact Details">
                    <h:panelGrid columns="2">
                    <h:outputText value="#{bundle.ViewSalesLeadEntityLabel_contactNumber}"/>
                    <h:outputText value="#{salesLeadEntityController.selected.contact.contactNumber}" title="#{bundle.ViewSalesLeadEntityTitle_contact}"/>
                    <h:outputText value="#{bundle.ViewSalesLeadEntityLabel_email}"/>
                    <h:outputText value="#{salesLeadEntityController.selected.contact.email}" title="#{bundle.ViewSalesLeadEntityTitle_contact}"/>
   
                     </h:panelGrid>
                 
            
            </p:panel>
                <br />
                     <ui:include src="/entities/addressEntity/ListAddress.xhtml"/>
                <br />          
                <p:commandButton ajax="false" action="Edit" value="#{bundle.ViewSalesLeadEntityEditLink}" rendered="#{loginBacking.editSalesLead}"/>
                <p:commandButton ajax="false" action="#{salesLeadEntityController.destroyAndView}" value="Delete" rendered="#{salesLeadEntityController.selected.archived==false and loginBacking.deleteSalesLead}"/>
            
            </h:form>
        </ui:define>
    </ui:composition>

</html>
